from picshell.engine.util.Format import Format
class AssertUtil :
    
    @staticmethod
    def parse(lineCode):
        label=""
        var =""
        ref = ""
        
        parts = lineCode.strip().split("@assertEquals")
        assertParts = parts[1].split(" ")
        ref = Format.toNumber(assertParts[1])
        label = assertParts[2]
        firstPart = parts[0].split("(")[1]
        var = firstPart.split(")")[0]
        
        return {"label":label,"var":var,"ref":ref}
        
        
        